<template>
	<view>
		<view class="list" v-for="(x,index) in keys" :key="x.key">
			<view class="lable">{{x.lable}}</view>
			<view class="value">
				<slot :name="x.slot || 'default'" :row="x" :value="value[x.key]" :index="index">
					{{value[x.key]}}
				</slot>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			value: {
				type: Object,
				default () {
					return {};
				}
			},
			keys: {
				type: Array,
				default () {
					return [];
				}
			}
		}
	}
</script>
<style lang="scss" scoped>
	.list {
		display: flex;
		align-items: center;
		padding: 15px;
		color: #000;
		font-size: 18px;
		position: relative;

		&::after {
			content: '';
			position: absolute;
			left: 10px;
			right: 0;
			bottom: 0;
			transform: scaleY(.3);
			border-bottom: 1px solid rgba(0, 0, 0, .2);
		}

		.value {
			color: #999999;
			flex: 1;
			text-align: right;
		}
	}
</style>
